/**
 * Copyright (c) 2013-Now http://dreamcode123321.com All rights reserved.
 */
package com.jeesite.modules.ab.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.ab.entity.AbNews;
import com.jeesite.modules.ab.dao.AbNewsDao;

import javax.annotation.Resource;

/**
 * 新闻Service
 * @author dc
 * @version 2020-07-12
 */
@Service
@Transactional(readOnly=true)
public class AbNewsService extends CrudService<AbNewsDao, AbNews> {

	@Resource
	AbNewsDao abNewsDao;

	public List<AbNews> shortListData() {
		return abNewsDao.shortListData();
	}

	/**
	 * 获取单条数据
	 * @param abNews
	 * @return
	 */
	@Override
	public AbNews get(AbNews abNews) {
		return super.get(abNews);
	}
	
	/**
	 * 查询分页数据
	 * @param abNews 查询条件
	 * @param abNews.page 分页对象
	 * @return
	 */
	@Override
	public Page<AbNews> findPage(AbNews abNews) {
		return super.findPage(abNews);
	}
	
	/**
	 * 保存数据（插入或更新）
	 * @param abNews
	 */
	@Override
	@Transactional(readOnly=false)
	public void save(AbNews abNews) {
		super.save(abNews);
	}
	
	/**
	 * 更新状态
	 * @param abNews
	 */
	@Override
	@Transactional(readOnly=false)
	public void updateStatus(AbNews abNews) {
		super.updateStatus(abNews);
	}
	
	/**
	 * 删除数据
	 * @param abNews
	 */
	@Override
	@Transactional(readOnly=false)
	public void delete(AbNews abNews) {
		super.delete(abNews);
	}
	
}